package rpc

import (
	"MessageSendService/app/core/rpc/proto"
	"fmt"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
)

var serviceHost = "127.0.0.1:8089"

var Client proto.MessageServiceClient

func InitGRPC() {
	conn, err := grpc.Dial(serviceHost, grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		fmt.Println(err)
	}
	Client = proto.NewMessageServiceClient(conn)
}
